package topday1_9.demo3;

/**
 * @Auther:小陈的Java
 */
public class A {
}
class B extends  A{

}
class C extends B{
    public static void main(String[] args) {
        C c = new C();
        System.out.println(c instanceof C);
        System.out.println(c instanceof B);
        System.out.println(c instanceof A);
        System.out.println(c instanceof Object);

        A a = new A();
        System.out.println(a instanceof C);
        System.out.println(a instanceof B);
        System.out.println(a instanceof A);
        System.out.println(a instanceof Object);
    }
}
